<?php
class PC4_Crud_NoticiasComCategorias extends PC4_Crud_Tabelas {
	
	public function __construct($config = null, $definition = null) {
    	if (is_string($config)) {
    		$config = array(
    			self::NAME => $config
    		);
    	}
		$config = array_merge(array(
			'name' => 'noticias',
			'tabelas' => array(
				'noticias_categorias nc' => array(
					'pk' => 'nc.id',
					'fk' => 'n.id_noticias_categorias',
					'campos' => array('nomeCategoria' => 'nome')
				)
			)
		), (array)$config);
		parent::__construct($config, $definition);
	}
	
}